package com.roncoo.video.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.roncoo.chapter.entity.EduChapterPeriod;
import com.roncoo.video.entity.UserCourse;
import com.roncoo.video.service.UserCourseService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wdf
 * @since 2021-04-10
 */
@RestController
@RequestMapping("/userCourse")
public class UserCourseController {
    @Resource
    private UserCourseService userCourseService;

    @ApiOperation(value = "修改课程视频的播放时间 ")
    @PostMapping("updateTime")
    public Boolean updateTime(UserCourse userCourse) {
       return userCourseService.updateById(userCourse);
    }
    /**
     * 将学习记录添加到用户课程里
     */
    @PostMapping("addData")
    public boolean adddata(UserCourse userCourse){
        return userCourseService.addData(userCourse);
    }
}

